#ifndef MACORS_H_
#define MACORS_H_

#define SAFE_DELETE(p)       { if (p) { delete (p);     (p)=NULL; } }
#define SAFE_DELETE_ARRAY(p) { if (p) { delete[] (p);   (p)=NULL; } }

//
// Set built-in type.
//
#define SetMacro(name,type) \
	void Set##name (type _arg) \
{ \
	if (this->m_##name != _arg) \
{ \
	this->m_##name = _arg; \
} \
} 

//
// Get built-in type.
//
#define GetMacro(name,type) \
	type Get##name () { \
	return this->m##name; \
} 
#endif // MACORS_H_